const Koa = require('koa')
const Router = require("koa-router")
const InitManager = require('./core/init')
const router = new Router()
const app = new Koa()
const catchError = require('./middlewares/exception')
InitManager.initCore(router)
app
  .use(catchError)
  .use(router.routes())
  .use(router.allowedMethods())

app.listen(3000, () => {
  console.log('app run at http://localhost:3000')
})